<template>
    <div class="son">
    <h1>子组件</h1>
    <!-- 触发事件 -->
    <button @click="emitter.emit('send-son','哈哈哈')">触发回调</button>
</div>
</template>

<script lang="ts">
export default {
name:'Son'
}
</script>


<script setup lang="ts">
//引入emitter
import emitter from '@/utils/emitter';


</script>

<style lang="css">
.son{
    margin: 20px;
    width: 400px;
    height: 100px;
    background-color:antiquewhite;
}
</style>